<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<input type="hidden" th:value="${payMsg}" name="payMsg">

<script src="../../static/js/jquery-3.3.1.min.js" th:src="@{/js/jquery-3.3.1.min.js}"></script>
<script>
    $(function () {
        var payMsg = $('input[name=payMsg]').val();

        if(payMsg != null){
            alert(payMsg);
            window.location = '/order/orderList';
        }else if(payMsg == '该订单信息不存在!'){
            alert(payMsg);
            window.location = '/order/orderList';
        }

    })
</script>
</body>
</html>